#ifndef _BARTER_SERVER_CRYPTOSYSTEM_H_
#define _BARTER_SERVER_CRYPTOSYSTEM_H_

#include "NetworkMessage.h"

class CryptoSystem
{
private:
	unsigned char Key[16];
	CryptoSystem();
	CryptoSystem(const CryptoSystem&);
	CryptoSystem& operator=(const CryptoSystem&);
	int Decode(char*, unsigned char*, int);
	void Encode(unsigned char*, int, char*);
public:
	~CryptoSystem();
	void Init();
	static CryptoSystem& Instance();
	NetworkMessage Encrypt(NetworkMessage);
	NetworkMessage Decrypt(NetworkMessage);
	std::string Hash(std::string); // returns a hex string
}:

#define crypto CryptoSystem::Instance()

#endif // _BARTER_SERVER_CRYPTOSYSTEM_H_
